#include <base/Foo.h>
#include <base/Rand.h>

static Foo foo ;

#ifdef WIN32
#define nullptr NULL
#endif

Foo* getRandPtr()
{
    static Foo* list[] = { nullptr, &foo, nullptr, nullptr};

    int index = Rand<0, (sizeof(list)/ sizeof(Foo*))>();
    return list[index];
}

Foo& getFo()
{
    static Foo impl(1);
    return impl;
}

Foo& getFo1()
{
    static Foo impl(2);
    return impl;
}